package org.jeecg.modules.ws.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.ws.entity.WsBankBlockTrade;
import org.jeecg.modules.ws.mapper.WsBankBlockTradeMapper;
import org.jeecg.modules.ws.service.IWsBankBlockTradeService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.Collections;
import java.util.Date;
import java.util.List;

/**
 * @Description: 银行账号-大额交易
 * @Author: jeecg-boot
 * @Date:   2025-04-24
 * @Version: V1.0
 */
@Service
public class WsBankBlockTradeServiceImpl extends ServiceImpl<WsBankBlockTradeMapper, WsBankBlockTrade> implements IWsBankBlockTradeService {

    @Override
    public List<WsBankBlockTrade> getByTxnTime(Date beginTime, Date endTime) {
        LambdaQueryWrapper<WsBankBlockTrade> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.ge(WsBankBlockTrade::getTxnTime, beginTime)
                   .lt(WsBankBlockTrade::getTxnTime, endTime);
        return this.list(queryWrapper);
    }

    @Override
    public List<WsBankBlockTrade> getByTxnTimeAndNoticeStatus(Date beginTime, Date endTime, String noticeStatus) {
        LambdaQueryWrapper<WsBankBlockTrade> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.ge(WsBankBlockTrade::getTxnTime, beginTime)
                   .lt(WsBankBlockTrade::getTxnTime, endTime)
                   .eq(WsBankBlockTrade::getNoticeStatus, noticeStatus);
        return this.list(queryWrapper);
    }
}
